home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Communications
/
General
/
DialScript
/
Examples
/
AttackDial.ds
next >
Wrap
Text File
|
1994-03-07
|
639b
|
27 lines
script AttackDial -- Dial number on Hayes modem until connect
state Init
setvar Phone_Number "459-5346";
next "Dial";
end;
state Dial
send "\r"; send "AT\r";
wait "OK"; -- This is bad. Should have timeout.
-- It would be faster to send "ATDT9876543\r"
send "ATDT"; send Phone_Number; send "\r";
select
"CONNECT" : next "GotIt";
"BUSY" : next "Dial";
"NO CARRIER" : next "Dial";
timeout 25 : display "Dial timeout!\r"; next "Dial";
end;
end; -- Dial
state GotIt
display "connected\r";
end;
end;